package com.enjoyor.soa.traffic.frame.support.file;

import javax.servlet.http.HttpServletResponse;

import org.springframework.web.multipart.MultipartFile;

import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

public interface IFilesTool {

    /**
     * 文件上传
     * 
     * @param file
     * @return
     */
    public ResultPojo fileUpload(MultipartFile file);

    public ResultPojo fileUpload(MultipartFile file, String secondFilePath);

    public ResultPojo fileUpload(MultipartFile file, String secondFilePath, String fileNewName);

    public ResultPojo fileUploadBase64(String base64Data, String secondFilePath);

    /**
     * 文件删除
     * 
     * @param fileDir
     * @param fileName
     * @return
     */
    public ResultPojo removeFile(String secondDir, String fileName);

    /**
     * 文件下载
     * 
     * @param secondDir
     * @param fileName
     * @param response
     * @return
     */
    public void downloadFile(String secondDir, String fileName, HttpServletResponse response);

}
